// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store/index'
import iView from 'iview'
import 'iview/dist/styles/iview.css'
import Axios from 'axios';
import $ from 'jquery'
import func from '@/libs/func.js'
import  jsCookie from  'js-cookie' ;

//import sockjs from 'sockjs'
// import stompJs from 'stompjs'

// console.log(stompJs)

// let client = stompJs.overWS('ws://192.168.6.72:10010/pushman')
// console.log(client)



Vue.prototype.baseIframeUrl = '/mdvipkidweb/softphone/softphone.html';
Vue.prototype.login_URL = '/webapiThird1/auth/login';
// Vue.prototype.ManloginURL = '/123ifly/ifly_auth/login.action';
Vue.prototype.ManloginURL = '/ifly_auth/login.action';
//服务器路径
// Vue.prototype.baseIframeUrl = '/bendi/softphone/softphone.html';

// Vue.prototype.baseIframeUrl = 'mdvipkidweb/softphone/';
// Vue.prototype.baseIframeUrl = 'http://192.168.6.80/mdvipkidweb/softphone/';









window.eventBus = new Vue({})
Vue.prototype.$ajax = Axios;
Vue.config.productionTip = false
Vue.use(iView)

Vue.prototype.Func = func
// router.beforeEach((to, from, next) => {
//   const  flag = jsCookie.get('sessId')
//   if(flag){
//     next()
//   }else {
//   if(to.path =='/login' ){
//     next()
//   }else{
//     next({
//       path:'/login'
//     });
//   }
//
//   }
// })
/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    template: '<App/>',
    components: { App }
})
